#include "CServiceGroupDescriptor.h"


CServiceGroupDescriptor::CServiceGroupDescriptor(void):IDescriptorData(DESCRIPTOR_TAG_SERVICE_GROUP)
, m_dwServiceGroup(0)
{	
	
}

CServiceGroupDescriptor::~CServiceGroupDescriptor(void)
{
}

void CServiceGroupDescriptor::GetData(BYTE* buff  , int &len)
{	
	CBuffer stBuffer(buff,DESCRIPTOR_MAXLEN);
	PACK_DESCRIPTOR_BUFFER_START(stBuffer,DESCRIPTOR_TAG_SERVICE_GROUP);

	stBuffer.Write(m_dwServiceGroup);
	list_it it = m_stDesList.begin();
	while(it != m_stDesList.end())
	{	
		
		stBuffer.Write(it->m_wNetworkId);
		stBuffer.Write(it->m_wTsId);
		stBuffer.Write(it->m_wServiceId);
		it++;
	}

	len = PACK_DESCRIPTOR_BUFFER_END(stBuffer);

}